import Vue from 'vue';
import App from './App';
import store from '@/vuex/index'; //vuex
import router from './router';
import '@/assets/js/global.js'; //公共配置


import VueI18n from 'vue-i18n'; //言语国际化
import Burma from '@/assets/language/burma.js'; //缅甸语
import EN from '@/assets/language/en.js'; //英语
import ZH from '@/assets/language/zh.js'; //中文

Vue.use(VueI18n);

/**
 * 切换语言
 */
let language = localStorage.getItem('language');
const i18n = new VueI18n({
	locale: language ? language : 'ZH', //默认语言
	messages: {
		'Burma': Burma,
		'EN': EN,
		'ZH': ZH,
	}
});

const vm = new Vue({
	el: '#app',
	i18n,
	store,
	router,
	components: {
		App
	},
	template: '<App/>'
})

window.vm = vm;
